<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/10/19 0019
 * Time: 下午 4:30
 */

namespace App\Http\Controllers;


use App\Jobs\SendReminderEmail;
use TCG\Voyager\Models\Post;

class QueuetestController extends Controller
{
    public function index()
    {
        $datas = Post::all();
        foreach ($datas as $data) {
            $job = (new SendReminderEmail($data->id));
            $this->dispatch($job);
        }
        return redirect('/admin');
    }
}